﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


namespace BSCMFF.Web.UserControls.Details
{
    /// <summary>
    /// Task Details.
    /// </summary>
    /// <remarks></remarks>
    public partial class TaskDetails : System.Web.UI.UserControl
    {
        /// <summary>
        /// Gets the name.
        /// </summary>
        /// <remarks></remarks>
        public String Name
        {
            get
            {
                return RadTextBoxName.Text;
            }
        }

        /// <summary>
        /// Gets the description.
        /// </summary>
        /// <remarks></remarks>
        public String Description
        {
            get
            {
                return RadTextBoxDescription.Text;
            }
        }

        /// <summary>
        /// Gets the priority.
        /// </summary>
        /// <remarks></remarks>
        public int Priority
        {
            get
            {
                double? p = RadNumericTextBoxPriority.Value;
                return p == null ? 0 : (int)p ;
            }
        }

        /// <summary>
        /// Gets the weight.
        /// </summary>
        /// <remarks></remarks>
        public int? Weight
        {
            get
            {
                return (int?)RadNumericTextBoxWeight.Value;
            }
        }

        /// <summary>
        /// Gets the assigned.
        /// </summary>
        /// <remarks></remarks>
        public DateTime? Assigned
        {
            get
            {
                return RadDatePickerAssigned.SelectedDate;
            }
        }

        /// <summary>
        /// Gets the expected.
        /// </summary>
        /// <remarks></remarks>
        public DateTime? Expected
        {
            get
            {
                return RadDatePickerEndExpected.SelectedDate;
            }
        }

        /// <summary>
        /// Gets the completed.
        /// </summary>
        /// <remarks></remarks>
        public DateTime? Completed
        {
            get
            {
                return RadDatePickerCompleted.SelectedDate;
            }
        }

        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// <remarks></remarks>
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }        
    }
}